class StringFormat {
  static String format(String source, List<dynamic> formatValue) {
    List<String> splits = source.split("%s");
    String result = "";
    for (int i = 0; i < splits.length; i++) {
      String str = splits[i];
      if (i == 0) {
        result = str;
      } else {
        result = "$result${formatValue[i - 1] ?? ""}$str";
      }
    }
    return result;
  }
}
